<?php

class commodity
{
    public $name;
    public $price;
    public $num;

    function self_information()
    {
        echo "这个商品的名称是"."$this->name".",单件价格为:".$this->price."元！<br>";
    }

}